CouCouGen.js — Crush-Lite Statistical Test Suite
Battery of 7 statistical tests adapted from Diehard / TestU01 for browser-based execution
Real Dieharder Test Results (100M numbers, offline)
CouCouGen FAILS the following tests: rank_32x32, rank_6x8, bitstream, opso, oqso, dna, count_1s_str, count_1s_byt, birthdays.
PASSES tests of basic uniformity: operm5, parking_lot, 2dsphere, 3dsphere, squeeze, sums, runs, craps.
Practical meaning: Use for full 32-bit integers (games, visualizations).
Avoid for: bit-level operations (value & 1), Monte Carlo, matrix math, cryptography.
⚠ Important Disclaimer
The author does not guarantee the correctness of these test implementations. They are provided for demonstration and educational purposes only. Do not rely on these results for critical decisions. Statistical tests are subtle — a PASS here does not prove the generator is flawless, and a FAIL may indicate a bug in the test itself rather than in the generator. Always verify independently using established test suites (TestU01, Diehard, NIST STS) on generated data before drawing conclusions. Trust no one's code — run the tests yourself.
Crush-Lite Battery — demonstration only
This is a lightweight adaptation of classic statistical tests for browser execution. It checks basic uniformity (chi-square), serial correlations, gaps, poker patterns, coupon collector, permutations, and runs.
What this battery does NOT detect: bit-level correlations, matrix rank deficiencies, bitstream patterns — all of which CouCouGen fails in full Dieharder testing.
If you see PASS here, it does NOT mean the generator is statistically sound. It only means basic uniformity tests pass. For proper validation, use established offline suites.
Inspired by: Diehard (Marsaglia), TestU01 (L'Ecuyer), NIST SP 800-22. Not a replacement for full-scale testing.
Test Results
| Test | Description | CouCouGen | Expected Range | Status |
| Press "Run all tests" |
Tested on a single sample. For robust results, run multiple times and check consistency. Full-scale validation requires external suites: TestU01 BigCrush (2^38 values), Diehard (2^29 values), NIST STS (10^6 values).